home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
p4
/
p4-1_2c.lha
/
p4-1.2c
/
servers
/
README
< prev
next >
Wrap
Text File
|
1993-05-24
|
4KB
|
140 lines
This directory contains code for two servers, a secure server and one
that is not secure. We recommend that you use only the secure server,
we use the other one only for testing.
This secure server can be installed for use public use, i.e. all
users can use the same copy, or you can make it available such that
individual users can start it up as they need it. Each method has
its won advantages/disadvantages.
Secure server installation for public use
-----------------------------------------
The following steps are done as a non-root user, to install the
server. We assume that it has been made as part of the top-level
p4 installation.
1. Decide in which directory the server will live. By default it
goes into /etc. There will be two files in that directory: serv_p4
(the server), and serv_p4.log (a logfile created by serv_p4). This
will be the SERVER_HOME directory.
2. Edit Makefile to reflect the correct value for SERVER_HOME.
The values for P4_PORT and P4_PORT_NAME should not need to be changed.
3. Do a "make all".
As root:
4. Add an entry to /etc/services. The contents of services.entry
should work.
If you are on a NIS/YellowPages network, this step need only be done
on the NIS server machine. After making the change, cd to the NIS
directory (usually /var/yp) and do a "make".
5. Add an entry to /etc/inetd.conf for the server. See the manual page
for inetd(8) for the correct syntax. One of the examples in
inetd.entry is probably correct for your system.
Ensure that the server will be run as root.
Ensure that the pathname in /etc/inetd.conf points to the correct place.
6. Make inetd aware of the new entry. On newer Unices, you should be
able to do a "kill -HUP <inetd process id>". If that does not work,
kill ("kill <inetd process id") and restart ("/etc/inetd &") inetd. If
all else fails, reboot the machine.
7. Do a "make install". This will copy serv_p4 to
the SERVER_HOME directory.
--------------------------------------------------
The P4 secure server should now be available. If you have problems,
first try to telnet directly to the server:
% telnet <machine> serv_p4
If you get the error
serv_p4: bad port number
the /etc/services entry is incorrect. Did you do a make in /var/yp on
a NIS system?
If you get the error
telnet: connect: Connection refused
inetd probably didn't get restarted correctly, or there is a syntax
error in the /etc/inetd.conf file.
Installing the server for private use
-------------------------------------
Merely make the server in a directory where all users can execute it,
and then note the following:
The server has several options (I didn't explain these earlier).
o -d says to run in "daemon" mode. This is as opposed to
"inetd" mode: it will loop accepting connections itself,
instead of expecting fd 0 to be the net connection.
o "-p port" says to listen on port, instead of the default port.
If port is set to 0, the server will pick a port and print
its value to stdout.
o "-l logfile" sets the logfile.
o "-D" says run in debug mode. By default, in daemon mode the
server will fork and disconnect itself from the terminal. The
-D flag disables this.
If a non-root user runs the server, it will only run processes for that
user. It will also assume "-p 0" and "-D" and set the default logfile
to "P4Server.log.<pid>".
Using P4 with the server
------------------------
In order for the server to execute a slave process, several
requirements must be met.
o The name of the executable must be supplied as a full pathname
in the procgroup file
o A file called .p4apps must exist in the home directory of the
user under whose account the process will be run. The .p4apps
file contains a list of filenames for executable p4 slaves,
one per line. An executable must be listed in this file for
the server to execute it.
For example, if the procgroup file entry is
remote 1 /usr/user/sr_slave ruser
the file ~ruser/.p4apps must exist on the machine called
"remote" and contain the line
/usr/user/sr_slave
In the file .p4apps blank lines and lines starting with '#'
are ignored.
The server will require the user to supply a password if the proper
/etc/hosts.equiv or ~user/.rhosts files do not have the appropriate
entries. In other words, if rlogin requires a password, so will the P4
server.